public class Bus extends Car {
	private int numberOfSeats;
	private boolean placeForLuggage;
	private double freeSpaceForLuggage;

	Bus(int numberOfDoors, boolean isSportCar) {
		super(numberOfDoors, isSportCar);
		isSportCar=false;
		numberOfSeats = 8;
		placeForLuggage = true;
		freeSpaceForLuggage = 500;
	}

	public void checkSpaceForLuggage() {

	}

	public void putLuggage(double luggageSize) {
		if (luggageSize >= 0) {
			if (freeSpaceForLuggage > luggageSize)
				freeSpaceForLuggage -= luggageSize;
			else
				System.out
				.println("Not enough place for so much luggage, you won't fit"
						+ (luggageSize - freeSpaceForLuggage) + " luggage");
			freeSpaceForLuggage = 0;
			placeForLuggage = false;
			

		}
	}

	public int getNumberOfSeats() {
		return numberOfSeats;
	}

	public void setNumberOfSeats(int numberOfSeats) {
		if (numberOfSeats > 0)
			this.numberOfSeats = numberOfSeats;
	}

	public boolean isPlaceForLuggage() {
		return placeForLuggage;
	}

	public void setPlaceForLuggage(boolean placeForLuggage) {
		this.placeForLuggage = placeForLuggage;
	}

	public double getFreeSpaceForLuggage() {
		return freeSpaceForLuggage;
	}

	public void setFreeSpaceForLuggage(double freeSpaceForLuggage) {
		if (freeSpaceForLuggage > 0)
			this.freeSpaceForLuggage = freeSpaceForLuggage;
	}

}
